﻿Imports SASettings

Public Class StartupSettings
    Dim mSettings As Settings
    ReadOnly Property GetValue(Key As SettingsValue) As String
        Get
            Return mSettings.GetValue(Key)
        End Get
    End Property
    Sub New()
        mSettings = New Settings(gApp.SettingsFile)
        If mSettings.GetValue(SettingsValue.StartupCreated) Is Nothing Then
            CreateDefaultSettings()
        End If
    End Sub
    Sub Add(Key As SettingsValue, Value As Object)
        mSettings.Add(Key, Value)
    End Sub
    Sub Save()
        mSettings.SaveFile()
    End Sub
    Sub CreateDefaultSettings()
        mSettings.Add(SettingsValue.StartupCreated, True)
        mSettings.Add(SettingsValue.InstallerVersion, "0.0.0.0")
        mSettings.SaveFile()
    End Sub
    Enum SettingsValue
        StartupCreated = 1000000
        InstallerVersion = 1000001
    End Enum
End Class
